package com.kehutong.repair.dto;

import com.kehutong.repair.enums.FlowAction;
import com.kehutong.repair.enums.Target;
import com.kehutong.repair.enums.TimeUnit;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.UnSave;

import java.util.List;

public class FlowRuleNode extends Entity {

    private static final long serialVersionUID = 195788389286860685L;

    protected FlowRuleNode(String id) {
        super(id);
    }

    @Column(comment="企业编号")
    private String companyNo;

    @Column(comment="企业名称")
    private String companyName;

    @Column(comment="流程编号")
    private String flowNo;

    @Column(comment = "工作流事件")
    private FlowAction action;

    @Column(comment = "等待时间")
    private int waitTime;

    @Column(comment = "时间单位")
    private TimeUnit unit;

    @Column(comment = "目标类型")
    private Target target;

    @Column(comment = "目标编号")
    private String targetNo;

    @Column(comment = "目标名称")
    private String targetName;

    @Column(comment = "部门编号")
    private List<String> departmentNos;

    @Column(length = 127, comment = "发送内容")
    private String content;

    @Column(comment="是否拥有转单的权限")
    private boolean permissions;

    @UnSave
    private List<Department> departments;

    @UnSave
    private List<String> departmentName;

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getFlowNo() {
        return flowNo;
    }

    public void setFlowNo(String flowNo) {
        this.flowNo = flowNo;
    }

    public FlowAction getAction() {
        return action;
    }

    public void setAction(FlowAction action) {
        this.action = action;
    }

    public int getWaitTime() {
        return waitTime;
    }

    public void setWaitTime(int waitTime) {
        this.waitTime = waitTime;
    }

    public TimeUnit getUnit() {
        return unit;
    }

    public void setUnit(TimeUnit unit) {
        this.unit = unit;
    }

    public Target getTarget() {
        return target;
    }

    public void setTarget(Target target) {
        this.target = target;
    }

    public String getTargetNo() {
        return targetNo;
    }

    public void setTargetNo(String targetNo) {
        this.targetNo = targetNo;
    }

    public String getTargetName() {
        return targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isPermissions() {
        return permissions;
    }

    public void setPermissions(boolean permissions) {
        this.permissions = permissions;
    }

    public List<String> getDepartmentNos() {
        return departmentNos;
    }

    public void setDepartmentNos(List<String> departmentNos) {
        this.departmentNos = departmentNos;
    }

    public List<Department> getDepartments() {
        return departments;
    }

    public void setDepartments(List<Department> departments) {
        this.departments = departments;
    }

    public List<String> getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(List<String> departmentName) {
        this.departmentName = departmentName;
    }
}
